package com.qf.commerce.mapper;

import com.qf.commerce.common.dto.GoodsReturnedDto;
import com.qf.commerce.entity.GoodsReturned;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface GoodsReturnedMapper {
    List<GoodsReturned> selectGoodsReturnedMapper(@Param("goodsReturnedDto") GoodsReturnedDto goodsReturnedDto);

    //批量删除
    int deleteById(@Param("returnOrderId")List<Long> returnOrderId);
    //批量收货  先查询是否是待收货状态
    List<GoodsReturned> selectDeliverById(@Param("returnOrder")List<Long> returnOrderId);
    //批量修改收货状态
    int updateDeliverById(@Param("returnOrder")List<Long> returnOrderId);
    //批量退款 原理同上
    List<GoodsReturned> selectReturnMoneyById(@Param("returnOrder")List<Long> returnOrderId);
    //批量修改退款
    int updateReturnMoneyById(@Param("returnOrder")List<Long> returnOrderId, @Param("returnMoney")BigDecimal returnMoney);
    List<GoodsReturned> selectGoodsZone();
    List<GoodsReturned> selectGoodsOne();
    List<GoodsReturned> selectGoodsTwo();
    List<GoodsReturned> selectGoodsThree();
    List<GoodsReturned> selectGoodsFour();
    List<GoodsReturned> selectGoodsFive();
    List<GoodsReturned> selectGoodsLower();

    //根据id查询 退货订单详细数据
    GoodsReturned selectGoodsReturnedById(@Param("returnOrderId")Long returnOrderId);

    //审批退货请求 （修改）拒绝退货
    int updateReturnInject(@Param("goodsReturned") GoodsReturned goodsReturned);
    //审批退货请求 （修改）同意退货
    int updateReturnCan(@Param("goodsReturned") GoodsReturned goodsReturned);

    //审批收货请求 （修改）确认收货
    int updateReturnReceive(@Param("goodsReturned") GoodsReturned goodsReturned);

    int updateReturnAbnormalReceive(@Param("goodsReturned") GoodsReturned goodsReturned);
    //查询商品金额
    GoodsReturned selectGoodsMoney(@Param("goodsReturned")GoodsReturned goodsReturned);
    //添加退货金额
    int updateReturnMoney(@Param("goodsReturned")GoodsReturned goodsReturned);
    //修改异常收货备注
    int updateReturnAbnormalReason(@Param("goodsReturned")GoodsReturned goodsReturned);
    //根据退货单物流号查询退货物流
    GoodsReturned selectReturnWaybill(@Param("goodReturned")GoodsReturned goodsReturned);

}
